package com.baymax.test.scene.demo

import android.os.Bundle
import android.app.DevInfoManager
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import androidx.core.view.setPadding
import com.baymax.test.scene.BaseScene
import com.baymax.test.scene.addDFView
import com.baymax.test.scene.newFlexContainer
import com.baymax.test.scene.newScrollContainer

class DevInfoScene : BaseScene() {
    override fun onCreateView(p0: LayoutInflater, p1: ViewGroup, p2: Bundle?): View {
        return p1.newScrollContainer() {
            val scene = this@DevInfoScene
            val ctx = requireActivity()
            addView(TextView(ctx))


            newFlexContainer {
                setPadding(30)

                addDFView(v = TextView(ctx)) {
                    text = "getDevInfo"
                    setOnClickListener {
                       val manager =
                        context.getSystemService(DevInfoManager.DATA_SERVER) as? DevInfoManager
                    println("manager is $manager")
                    }

                }

            }
        }
    }
}